#include "QiliSubtitleText.h"

#include <QStyle>
#include <QStyleOptionGraphicsItem>

QiliSubtitleText::QiliSubtitleText(const QString &text, QGraphicsItem *parent)
    : QGraphicsTextItem(text, parent)
{
    setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
}

void QiliSubtitleText::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
    QStyleOptionGraphicsItem modifiedOption(*option);
    modifiedOption.state = QStyle::State_None;
    QGraphicsTextItem::paint(painter, &modifiedOption, widget);
}
